/** @file  header.h
 *  @brief   header file 
 * 
 *  To add all the header files need by the application
 *   
 *  @author Karthik M 
 *  @bug No  bugs.
 */




#ifndef __SHARE_HEADER 

#define __SHARE_HEADER 


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>

#define err_abort(code ,text ) do {\
	fprintf ( stderr, " %s at \" %s \":%d: %s \n",\
			text, __FILE__, __LINE__, strerror(code)) ; \
	abort(); \
}while(0)


#define errno_abort(text) do {\
	fprintf (stderr, "%s at \" %s \":%d: %s \n",\
			text, __FILE__, __LINE__, strerror(errno)); \
	abort(); \
}while (0)

 struct data {
   char name[30];
   int age ;
   int gender ;
   int status ;
}  ;
typedef struct data DATA ;


# define MAXLINE 100
# define LINEMAX 100
# define NAMEMAX 100

void read ( char * , char  *  );
void create(char * ,char *);
void print (DATA  );



//! Validating function
int get_num (char *);
char * get_name (char * );
int get_enum (char *);


int valid_no(char *);
int is_int (char *);



#endif

